package models

import (
	"gorm.io/gorm"
	"time"
)

//type CustomClaims struct {
//	UID         int64
//	NickName    string
//	RoleName    string
//	AuthorityId uint // 角色
//	jwt.StandardClaims
//}

type Router struct {
	HttpMethod, RelativePath, Handler string
}

type ControlBy struct {
	CreateBy int `json:"createBy" gorm:"index;comment:创建者"`
	UpdateBy int `json:"updateBy" gorm:"index;comment:更新者"`
}

type Model struct {
	Id int `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"`
}

type ModelTime struct {
	CreatedAt time.Time      `json:"createdAt" gorm:"type:datetime;default:CURRENT_TIMESTAMP;comment:创建时间"`
	UpdatedAt time.Time      `json:"updatedAt" gorm:"type:datetime;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;comment:最后更新时间"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index;comment:删除时间"`
}
